package com.atguigu.gmall.realtime.tutorial.sql;


import org.apache.flink.table.annotation.DataTypeHint;
import org.apache.flink.table.annotation.FunctionHint;
import org.apache.flink.table.functions.TableFunction;
import org.apache.flink.types.Row;

@FunctionHint(output=@DataTypeHint("ROW<s STRING,l INT>"))
public class SensorNameUDTF extends TableFunction<Row> {
    public void eval(String value){
        for(int i=0;i<10;i++){
            Row row = new Row(2);
            row.setField(0,value+i);
            row.setField(1,i);
            collect(row);
        }
    }
}
